import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
import route from './routes/index';
import 'normalize.css';
import ElementPlus from "element-plus";
import "element-plus/dist/index.css"
import '@icon-park/vue-next/styles/index.css';
import pinia from "./store/index";
// import { createVuePlugin } from '@pinia/vue3-plugin'

// import VMdEditor from '@kangc/v-md-editor';
// 定义一个全局指令highlight 代码高亮的js
// import hljs from 'highlight.js';
// 引入样式 这里可能需要修改一下样式路径
// import 'highlight.js/scss/base16/atelier-cave-light.scss'; //样式文件
// import '@kangc/v-md-editor/lib/style/base-editor.css';
// import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
// import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

// VMdEditor.use(vuepressTheme, {
// 	Hljs: hljs,

// });



// ② 拿到pinia实例
 

const app = createApp(App);
app.use(ElementPlus)

// app.use(createVuePlugin)
// app.use(VMdEditor);
// app.directive('highlight', (el) => {
// 	const blocks = el.querySelectorAll('pre code');
// 	blocks.forEach((block: any) => {
// 		hljs.highlightBlock(block);
// 	});
// });
app.use(route);
app.use(pinia);
app.mount('#app');

